import request from '@/utils/request.js'

export const getRoleInfo = data => {
  return request({
    method: 'post',
    url: 'api/Permission/PagingRoles',
    data
  })
}

export const addRole = data => {
  return request({
    method: 'post',
    url: 'api/Permission/AddRole',
    data
  })
}

export const addRoleInit = data => {
  return request({
    method: 'post',
    url: 'api/Permission/AddRoleInit',
    data
  })
}

export const UpdaterRoleInfo = data => {
  return request({
    method: 'post',
    url: 'api/Permission/UpdaterRole',
    data
  })
}

export const deleteRole = data => {
  return request({
    method: 'post',
    url: 'api/Permission/Delete',
    data
  })
}

export const addUser = data => {
  return request({
    method: 'post',
    url: 'api/Permission/Add',
    data
  })
}

export const enableUser = data => {
  return request({
    method: 'post',
    url: 'api/Permission/Enable',
    data
  })
}

export const disableUser = data => {
  return request({
    method: 'post',
    url: 'api/Permission/Disable',
    data
  })
}

export const getAllRoleList = data => {
  return request({
    method: 'post',
    url: 'api/Permission/RoleList',
    data
  })
}

export const getQualification = data => {
  return request({
    method: 'post',
    url: 'api/Permission/Qualification',
    data
  })
}

export const getUserList = data => {
  return request({
    method: 'post',
    url: 'api/Permission/PagingUser',
    data
  })
}

export const UpdateRoleInit = data => {
  return request({
    method: 'post',
    url: 'api/Permission/UpdateRoleInit',
    data
  })
}

export const checkDetail = data => {
  return request({
    method: 'post',
    url: 'api/Permission/UserInfo',
    data
  })
}

export const editUserInfo = data => {
  return request({
    method: 'post',
    url: 'api/Permission/Update',
    data
  })
}

export const editRoleInfo = data => {
  return request({
    method: 'post',
    url: 'api/Permission/UpdaterRole',
    data
  })
}
